New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@citation-js/plugin-doi

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@citation-js/plugin-doi

Plugin for DOI input for Citation.js

  • 0.7.18
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.7K
decreased by-12.59%
Maintainers
1
Weekly downloads
 
Created
Source

@citation-js/plugin-doi

Plugin for DOI input for Citation.js.

NPM version NPM total downloads License Dependency status

Install

npm install @citation-js/plugin-doi

Usage

Register by importing the package:

require('@citation-js/plugin-doi')

'Polite' API access

The plugin fetches data from DOIs using DOI Content Negotiation, which means the Crossref, DataCite, and mEDRA APIs are indirectly used.

Crossref strongly encourages adding a mailto: link to the User-Agent header or URL parameters to get higher rate limits. Because the Crossref API is only used indirectly, the URL parameter method cannot be used consistently. Additionally, the User-Agent header cannot be set in the browser. For non-browser usage however, the user agent can be set like this:

const { util, version } = require('@citation-js/core')

util.setUserAgent(`Example Foo (mailto:foo@example.org) Citation.js/${version} Node.js/${process.versions.node}`)

Formats

Formats and other features added by this plugin.

Input

Supports DOIs inputted in the following ways:

  • @doi/api: a doi.org URL
  • @doi/id: a single DOI
  • @doi/list+text: whitespace-separated list of DOIs
  • @doi/list+object: array of DOIs

Additionally, the following internal type is exposed:

  • @doi/type: fix the type value in certain API responses

Keywords

FAQs

Package last updated on 28 Jan 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc